Removed dysfunctional wxPGPropery::PrepareValueForDialogEditing(); Replaced its functionality with wxPropertyGrid::GetPendingEditedValue(); Added wxPropertyGrid::PerformValidation() flags so it can be called in generic context.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -240,9 +240,6 @@
|
||||
@code
|
||||
virtual bool OnButtonClick( wxPropertyGrid* propGrid, wxString& value )
|
||||
{
|
||||
// Update property value from editor, if necessary
|
||||
PrepareValueForDialogEditing(propGrid);
|
||||
|
||||
wxSize dialogSize(...size of your dialog...);
|
||||
|
||||
wxPoint dlgPos = propGrid->GetGoodEditorDialogPosition(this,
|
||||
@@ -1199,24 +1196,6 @@ public:
|
||||
*/
|
||||
wxPGProperty* Item( size_t i ) const;
|
||||
|
||||
/**
|
||||
Updates property value in case there were last minute
|
||||
changes. If value was unspecified, it will be set to default.
|
||||
Use only for properties that have TextCtrl-based editor.
|
||||
|
||||
@remarks If you have code similar to
|
||||
@code
|
||||
// Update the value in case of last minute changes
|
||||
if ( primary && propgrid->IsEditorsValueModified() )
|
||||
GetEditorClass()->CopyValueFromControl( this, primary );
|
||||
@endcode
|
||||
in wxPGProperty::OnEvent wxEVT_COMMAND_BUTTON_CLICKED handler,
|
||||
then replace it with call to this method.
|
||||
|
||||
@return Returns @true if value changed.
|
||||
*/
|
||||
bool PrepareValueForDialogEditing( wxPropertyGrid* propgrid );
|
||||
|
||||
/**
|
||||
If property's editor is active, then update it's value.
|
||||
*/
|
||||
|
@@ -586,6 +586,14 @@ public:
|
||||
*/
|
||||
wxColour GetMarginColour() const;
|
||||
|
||||
/**
|
||||
Returns most up-to-date value of selected property. This will return
|
||||
value different from GetSelectedProperty()->GetValue() only when text
|
||||
editor is activate and string edited by user represents valid,
|
||||
uncommitted property value.
|
||||
*/
|
||||
wxVariant GetPendingEditedValue();
|
||||
|
||||
/**
|
||||
Returns cell background colour of a property.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user