Skip to content

Commit

Permalink
Fix #2, hardcoded handling of BITMAPBUTTON SIZE property
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasRosenstein committed Nov 5, 2015
1 parent 1111874 commit 98ea085
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions source/DialogCustomElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,17 @@ Bool CDialogCustomElement::Save(BaseFile* pFile, String strFill)
WriteString(pFile, pProp[i].ident);
WriteString(pFile, " ");
WriteString(pFile, String::IntToString(pBC->GetInt32(pProp[i].id)));

// XXX: BITMAPBUTTON SIZE is a CUSTOMTYPE_LONG property, yet it
// requires a tuple for the SIZE parameter. Can we find a better
// way than hardcoding this?
// https://github.com/nr-plugins/resedit/issues/2
if (String(pElement->m_pChResSym) == String("BITMAPBUTTON") &&
String(pProp[i].ident) == String("SIZE")) {
WriteString(pFile, ", ");
WriteString(pFile, String::IntToString(pBC->GetInt32(pProp[i].id)));
}

WriteString(pFile, "; ");
b = true;
}
Expand Down

0 comments on commit 98ea085

Please sign in to comment.