Image slicer spin boxes can now always be changed (within bounds), without being constrained back.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@665 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-09-02 19:21:46 +00:00
parent f1b09bb2e9
commit 749a04e822
2 changed files with 16 additions and 9 deletions
+9 -2
View File
@@ -19,6 +19,13 @@ DECLARE_POINTER_TYPE(AlphaMask);
// ----------------------------------------------------------------------------- : ImageSlice
/// Which option is just changed, and therefore more important?
enum PreferedProperty
{ PREFER_NONE
, PREFER_WIDTH
, PREFER_HEIGHT
};
/// A slice of an image, i.e. a selected rectangle
class ImageSlice {
public:
@@ -35,7 +42,7 @@ class ImageSlice {
int sharpen_amount;
/// Enforce relations between values
void constrain();
void constrain(PreferedProperty prefer = PREFER_NONE);
/// Get the sliced image
Image getSlice() const;
@@ -97,7 +104,7 @@ class ImageSliceWindow : public wxDialog {
// --------------------------------------------------- : Updating
// The manual controls were changed
void onUpdateFromControl();
void onUpdateFromControl(PreferedProperty prefer = PREFER_NONE);
// Update the values in the controls
void updateControls();
};