[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1734
Date : Sun Sep 3 19:41:59 BST 2006
Changed paths:
M /Trunk/XaraLX/Scripts/rc2xml.pl
M /Trunk/XaraLX/tools/freehand.cpp
M /Trunk/XaraLX/tools/freeinfo.cpp
M /Trunk/XaraLX/wxOil/dlgmgr.cpp
M /Trunk/XaraLX/wxOil/xrc/EN/brdlgres.xrc
More brush work
Diff:
Index: Trunk/XaraLX/tools/freehand.cpp
===================================================================
--- Trunk/XaraLX/tools/freehand.cpp (revision 1733)
+++ Trunk/XaraLX/tools/freehand.cpp (revision 1734)
@@ -1804,6 +1804,7 @@
// iterate through again and assign the selection pointers to the new array
UINT32 Counter = 0;
pNode = pSel->FindFirst();
+
while (pNode != NULL && Counter < m_NumInkNodes)
{
if (pNode->IsAnObject())
@@ -1816,7 +1817,9 @@
return;
}
if (BrushDefinition::ObjectCanCreateBrush((NodeRenderableInk*)pNode))
+ {
m_BrushInkNodeArray[Counter++] = (NodeRenderableInk*)pNode;
+ }
}
pNode = pSel->FindNext(pNode);
}
@@ -2047,14 +2050,14 @@
// that are actually in the document.
m_BrushInkNodeArray.clear();
-// m_BrushInkNodeArray.SetSize(NumObjects, -1);
+ m_BrushInkNodeArray.resize(NumObjects);
// fill the array with NULL objects so that we can check later
// to see if our allocations have worked
i = 0;
while (i < m_BrushInkNodeArray.size())
{
- m_BrushInkNodeArray[i] = NULL;
+ m_BrushInkNodeArray[i++] = NULL;
}
}
Index: Trunk/XaraLX/tools/freeinfo.cpp
===================================================================
--- Trunk/XaraLX/tools/freeinfo.cpp (revision 1733)
+++ Trunk/XaraLX/tools/freeinfo.cpp (revision 1734)
@@ -284,11 +284,13 @@
else if (Msg->DlgMsg == DIM_CREATE)
{
+#if 0
// NB - not #ifndef
#ifdef EXCLUDE_FROM_XARALX
EnableGadget(_R(IDC_CREATEBRUSH), FALSE);
EnableGadget(_R(IDC_EDITBRUSH), FALSE);
#endif
+#endif
HandleCreate();
}
else
@@ -331,8 +333,6 @@
break;
}
}
-PORTNOTE("other", "Removed CreateBrush and EditBrush")
-#ifndef EXCLUDE_FROM_XARALX
else if (Msg->GadgetID == _R(IDC_CREATEBRUSH))
{
pTool->CreateBrush();
@@ -351,7 +351,6 @@
break;
}
}
-#endif
else if (Msg->GadgetID == _R(IDC_BRUSHTYPE))
{
switch (Msg->DlgMsg)
@@ -726,7 +725,7 @@
SetBrushComboFromSelection();
//#ifdef BUILDNEWBRUSHES
// set up the brush gadget
-PORTNOTE("other", "Disabled Brush editing")
+PORTNOTE("other", "Disabled BrushGadget")
#ifndef EXCLUDE_FROM_XARALX
BrushGadget.LinkControlButton (this, _R(IDC_EDITBRUSH), _R(IDBBL_BRUSHEDIT), _R(IDS_BRUSHEDITDLG));
BrushGadget.DisableTimeStamping ();
@@ -2713,8 +2712,6 @@
if (!ControlsExist)
return;
-PORTNOTE("other", "Disabled Brush editing")
-#ifndef EXCLUDE_FROM_XARALX
// see if we're allowed to launch the brush dialog
OpState State = CBrushEditDlg::GetState(NULL, NULL);
//#ifdef BUILDNEWBRUSHES
@@ -2733,10 +2730,6 @@
EnableGadget(_R(IDC_CREATEBRUSH), TRUE);
//#endif
}
-#else
- EnableGadget(_R(IDC_CREATEBRUSH), FALSE);
- EnableGadget(_R(IDC_EDITBRUSH), FALSE);
-#endif
// WEBSTER - markn 25/4/97
// No pen stuff required in Webster
Index: Trunk/XaraLX/Scripts/rc2xml.pl
===================================================================
--- Trunk/XaraLX/Scripts/rc2xml.pl (revision 1733)
+++ Trunk/XaraLX/Scripts/rc2xml.pl (revision 1734)
@@ -150,7 +150,7 @@
sub IsPanel
{
my $name=shift @_;
- return 1 if ($name=~/^(IDD_TBITMAPSIZE|IDD_TIMAPOPTIONS|IDD_TBROWSER|IDD_TBITMAPOPTIONS|IDD_PALETTE_TAB|IDD_OPTSTAB_VIEW|IDD_OPTSTAB_MISC|IDD_OPTSTAB_PAGE|IDD_OPTSTAB_TUNE|IDD_OPTSTAB_SCALE|IDD_OPTSTAB_POINTERS|IDD_OPTSTAB_GRID|IDD_OPTSTAB_UNITS|IDD_OPTSTAB_PLUGINS|IDD_OPTSTAB_PRINTLAYOUT|IDD_OPTSTAB_PRINTGENERAL|IDD_OPTSTAB_PRINTPRINT|IDD_OPTSTAB_IMAGESETTING|IDD_OPTSTAB_INTERNET|IDD_BLOBTAB_PG1|IDD_BLOBTAB_PG2|IDD_BLOBTAB_PG3|IDD_TAB_ANIMATION_COLOURS|IDD_TAB_FRAME_PROPERTIES|IDD_TAB_ANIMATION_PROPERTIES|IDD_TAB_PREVIEW_IN_BROWSER|IDD_TAB_GUIDELINE_PROPERTIES|IDD_TAB_LAYER_PROPERTIES)$/);
+ return 1 if ($name=~/^(IDD_TBITMAPSIZE|IDD_TIMAPOPTIONS|IDD_TBROWSER|IDD_TBITMAPOPTIONS|IDD_PALETTE_TAB|IDD_OPTSTAB_VIEW|IDD_OPTSTAB_MISC|IDD_OPTSTAB_PAGE|IDD_OPTSTAB_TUNE|IDD_OPTSTAB_SCALE|IDD_OPTSTAB_POINTERS|IDD_OPTSTAB_GRID|IDD_OPTSTAB_UNITS|IDD_OPTSTAB_PLUGINS|IDD_OPTSTAB_PRINTLAYOUT|IDD_OPTSTAB_PRINTGENERAL|IDD_OPTSTAB_PRINTPRINT|IDD_OPTSTAB_IMAGESETTING|IDD_OPTSTAB_INTERNET|IDD_BLOBTAB_PG1|IDD_BLOBTAB_PG2|IDD_BLOBTAB_PG3|IDD_TAB_ANIMATION_COLOURS|IDD_TAB_FRAME_PROPERTIES|IDD_TAB_ANIMATION_PROPERTIES|IDD_TAB_PREVIEW_IN_BROWSER|IDD_TAB_GUIDELINE_PROPERTIES|IDD_TAB_LAYER_PROPERTIES|IDD_BRUSHEDITSPACING|IDD_BRUSHEDITOFFSET|IDD_BRUSHEDITSCALING|IDD_BRUSHEDITEFFECTS|IDD_BRUSHEDITSEQUENCE|IDD_BRUSHEDITFILL)$/);
return 0;
}
Index: Trunk/XaraLX/wxOil/xrc/EN/brdlgres.xrc
===================================================================
--- Trunk/XaraLX/wxOil/xrc/EN/brdlgres.xrc (revision 1733)
+++ Trunk/XaraLX/wxOil/xrc/EN/brdlgres.xrc (revision 1734)
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<resource>
- <object class="wxDialog" name="IDD_BRUSHEDITSPACING">
+ <object class="wxPanel" name="IDD_BRUSHEDITSPACING">
<pos>0,0d</pos> <size>190,127d</size>
<object class="wxStaticText" name="IDC_STATICBRUSHSPACING">
<pos>10,15d</pos> <size>27,8d</size>
@@ -51,7 +51,7 @@
<title>Spacing</title>
<label>Spacing</label>
</object>
- <object class="wxDialog" name="IDD_BRUSHEDITOFFSET">
+ <object class="wxPanel" name="IDD_BRUSHEDITOFFSET">
<pos>0,0d</pos> <size>190,119d</size>
<object class="wxStaticText" name="IDC_STATICPATHOFFSETVALUE">
<pos>10,28d</pos> <size>29,8d</size>
@@ -102,7 +102,7 @@
<title>Offset</title>
<label>Offset</label>
</object>
- <object class="wxDialog" name="IDD_BRUSHEDITSCALING">
+ <object class="wxPanel" name="IDD_BRUSHEDITSCALING">
<pos>0,0d</pos> <size>190,92d</size>
<object class="wxStaticBox" name="IDC_STATICBRUSHSCALINGRAND">
<pos>3,9d</pos> <size>180,55d</size>
@@ -151,7 +151,7 @@
<title>Scaling</title>
<label>Scaling</label>
</object>
- <object class="wxDialog" name="IDD_BRUSHEDITEFFECTS">
+ <object class="wxPanel" name="IDD_BRUSHEDITEFFECTS">
<pos>0,0d</pos> <size>204,119d</size>
<object class="wxCheckBox" name="IDC_CHECKROTATE">
<pos>10,6d</pos> <size>73,10d</size>
@@ -214,7 +214,7 @@
<title>Rotation</title>
<label>Rotation</label>
</object>
- <object class="wxDialog" name="IDD_BRUSHEDITSEQUENCE">
+ <object class="wxPanel" name="IDD_BRUSHEDITSEQUENCE">
<pos>0,0d</pos> <size>190,70d</size>
<object class="wxStaticBox" name="IDC_STATIC">
<pos>4,33d</pos> <size>200,40d</size>
@@ -254,7 +254,7 @@
<title>Transparency</title>
<label>Transparency</label>
</object>
- <object class="wxDialog" name="IDD_BRUSHEDITFILL">
+ <object class="wxPanel" name="IDD_BRUSHEDITFILL">
<pos>0,0d</pos> <size>197,117d</size>
<object class="wxCheckBox" name="IDC_CHECKTILEING">
<pos>7,87d</pos> <size>39,10d</size>
Index: Trunk/XaraLX/wxOil/dlgmgr.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgmgr.cpp (revision 1733)
+++ Trunk/XaraLX/wxOil/dlgmgr.cpp (revision 1734)
@@ -638,18 +638,19 @@
{
ActivePage = DlgPos->ActivePage;
ActivePageIndex = DlgPos->ActivePageIndex;
- if (pBook && ((ActivePageIndex<0) ||
- (ActivePageIndex >= pBook->GetPageCount()) ||
- ((UINT32)(pBook->GetPage(ActivePageIndex)->GetId()) != ActivePage)
- ))
- {
- ActivePageIndex=0;
- ActivePage = pBook->GetPage(0)->GetId();
- }
}
CreatedBefore = TRUE;
}
+ if (pBook && ((ActivePageIndex<0) ||
+ (ActivePageIndex >= pBook->GetPageCount()) ||
+ ((UINT32)(pBook->GetPage(ActivePageIndex)->GetId()) != ActivePage)
+ ))
+ {
+ ActivePageIndex=0;
+ ActivePage = pBook->GetPage(0)->GetId();
+ }
+
// Get the size of the dialog box (Required for the SetWindowPos function)
wxRect DialogRect( pDialogWnd->GetRect() );
INT32 DialogWidth = DialogRect.GetWidth();
Xara