Skip to content

Commit

Permalink
small modification
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Dec 19, 2024
1 parent 17287f2 commit 35f0c81
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Binary file not shown.
22 changes: 12 additions & 10 deletions tvpaint_plugin/library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ std::string to_utf8(const std::string &codepage_str) {

// mReq Identification of the requester. (=0 closed, !=0 requester ID)
static struct {
bool inOpen;
DWORD mReq;
DWORD tickReq;
PIFilter *current_filter;
Expand All @@ -61,6 +62,7 @@ static struct {
std::map<int, jsonrpcpp::Response> responses;

} Data = {
true,
0,
0,
nullptr,
Expand Down Expand Up @@ -537,6 +539,7 @@ int FAR PASCAL PI_Open(PIFilter* iFilter)
communication->connect();
register_callbacks();
}
Data.inOpen = false;
return 1;
}

Expand Down Expand Up @@ -655,13 +658,13 @@ int FAR PASCAL PI_Parameters(PIFilter* iFilter, char* iArg)
// Create empty requester because menu items are defined with
// `define_menu` callback
DWORD req = TVOpenFilterReqEx(
iFilter,
185,
20,
NULL,
NULL,
PIRF_STANDARD_REQ | PIRF_COLLAPSABLE_REQ,
FILTERREQ_NO_TBAR
iFilter,
185,
20,
NULL,
NULL,
PIRF_STANDARD_REQ | PIRF_COLLAPSABLE_REQ,
FILTERREQ_NO_TBAR
);
if (req == 0) {
TVWarning(iFilter, TXT_REQUESTER_ERROR);
Expand All @@ -676,12 +679,11 @@ int FAR PASCAL PI_Parameters(PIFilter* iFilter, char* iArg)

// Sets the title of the requester.
TVSetReqTitle(iFilter, Data.mReq, TXT_REQUESTER);

if (Data.newMenuItems) {
if (!Data.inOpen) {
newMenuItemsProcess(iFilter);
}

return 1;
return 1;
}

/**************************************************************************************/
Expand Down

0 comments on commit 35f0c81

Please sign in to comment.